Use doubles, not floats, internally for html, text, garmin_fit.
authorrobertlipe <robertlipe@f51c46e8-681c-474f-0cfe-069cfd0219fb>
Wed, 17 Jul 2013 01:54:00 +0000 (01:54 +0000)
committerrobertlipe <robertlipe@f51c46e8-681c-474f-0cfe-069cfd0219fb>
Wed, 17 Jul 2013 01:54:00 +0000 (01:54 +0000)
gpsbabel/garmin_fit.cc
gpsbabel/html.cc
gpsbabel/text.cc

index 415d51059b039abb42e251da98d1e2700dcf2e56..14bc02baa5396410330924cb074d3bcb5a0bbec4 100644 (file)
@@ -371,8 +371,8 @@ fit_parse_data(fit_message_def* def, int time_offset)
     }
 
     waypt = waypt_new();
-    waypt->latitude = (lat / (float)0x7fffffff) * 180;
-    waypt->longitude = (lon / (float)0x7fffffff) * 180;
+    waypt->latitude = (lat / (double)0x7fffffff) * 180;
+    waypt->longitude = (lon / (double)0x7fffffff) * 180;
     if (alt != 0xffff) {
       waypt->altitude = (alt / 5.0) - 500;
     }
index bf039787b72f4f6f6330623c48f4355a52326aa2..3459b17b703a0b16da2d4373b689a9a828a8c319 100644 (file)
@@ -200,8 +200,8 @@ html_disp(const waypoint* wpt)
       logpart = xml_findfirst(curlog, "groundspeak:log_wpt");
       if (logpart) {
         char* coordstr = NULL;
-        float lat = 0;
-        float lon = 0;
+        double lat = 0;
+        double lon = 0;
         coordstr = xml_attribute(logpart, "lat");
         if (coordstr) {
           lat = atof(coordstr);
index d059488994eacaacbc577042d20fdbe51a209d3c..a71baa38c288282beba7b08b7ae01b2fc87bf43f 100644 (file)
@@ -217,8 +217,8 @@ text_disp(const waypoint *wpt)
       logpart = xml_findfirst(curlog, "groundspeak:log_wpt");
       if (logpart) {
         char *coordstr = NULL;
-        float lat = 0;
-        float lon = 0;
+        double lat = 0;
+        double lon = 0;
         coordstr = xml_attribute(logpart, "lat");
         if (coordstr) {
           lat = atof(coordstr);